from ui.components.composite.nav_view_widget import NavViewWidget
from .risk_data_widget import RiskDataWidget


class DataViewWidget(NavViewWidget):
    def __init__(self):
        super().__init__()
        self.risk_data_page = RiskDataWidget()
        self.add_item(self.risk_data_page, "风险数据")

    def cleanup(self):
        """清理资源"""
        if hasattr(self, 'risk_data_page'):
            self.risk_data_page.cleanup()